echo -e "[$(date +"%Y-%m-%d %H:%M:%S")][\033[34mINFO\033[0m ] 开始执行构建"
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")][\033[34mINFO\033[0m ] 更新代码"
#git reset --hard
#git pull
#chmod 777 build.sh
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")][\033[34mINFO\033[0m ] \033[36m生成jar包start\033[0m"
mvn clean package -Dmaven.test.skip=true -P prod
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")][\033[34mINFO\033[0m ] \033[36m生成jar包end\033[0m"
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")][\033[34mINFO\033[0m ] \033[33m删除镜像 regis-api\033[0m"
docker rm -f regis-api
docker rmi -f regis-api
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")][\033[34mINFO\033[0m ] 开始构建镜像"
docker compose up -d
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")][\033[34mINFO\033[0m ] \033[32m构建完成\033[0m"